#ifndef __MCCIRCLE2D_H__
#define __MCCIRCLE2D_H__

#include <MCPlaneItem.h>
#include <MCPoint2D.h>

class MCCircle2D : public MCPlaneItem
{
public:

    MCCircle2D();
    MCCircle2D(MCPoint2D center, double radius);
    MCCircle2D(const MCCircle2D &circle);

    MCPlaneItemType type() override;
    void setPositionAt(const MCPoint2D &at) override;
    void move(const MCVector2 &to) override;
    void scale(double scale) override;
    void transform(const MCMatrix3 &transform) override;

    void update(MCPoint2D center, double radius);
    MCPoint2D center() const;
    double radius() const;

    static MCCircle2D from3Points(const MCPoint2D &p1, const MCPoint2D &p2, const MCPoint2D &p3);

private:

    MCPoint2D _center;
    double _radius;

};

#endif // !__MCCIRCLE2D_H__
